Skip to content

Commit

Permalink
Merge branch 'release/V1.6.0_dev_7'
Browse files Browse the repository at this point in the history
  • Loading branch information
bwl21 committed May 8, 2017
2 parents 9ccbfdd + 2f5e5ce commit a055d52
Show file tree
Hide file tree
Showing 129 changed files with 16,769 additions and 162 deletions.
5 changes: 5 additions & 0 deletions 30_sources/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
* now support dropbox API 2.0 (mandaory from June 17) #63
* now have dropdown menu for dropbox to open, save login, logout
* improve error reporting on dropbox save #128
* fine tune structure of configuration menu #116
* add another German tutorial #38

## Experimental features

* now can load the template from LocalStorage #71


## backward compatibilility issues
Expand Down
34 changes: 33 additions & 1 deletion 30_sources/DD_Zupfnoter/DD_zupfnoter.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
# Handling google analytics
rvm# Handling google analytics

* Analytics ia applied for webserver-installation only, not for localhost nor desktop
* this is done by the method `javascript_include_analytics` which is defined in the related rake tasks.
* for localhost, the method is not defined, and therefore the template does not include the script

# build environments

## rvm ruby homebrew etc

### having some trouble with SIP

https://digitizor.com/fix-homebrew-permissions-osx-el-capitan/

https://www.computersnyou.com/5307/setup-homebrew-and-rvm-on-mac-osx-10-11-ei-capitan/

http://stackoverflow.com/questions/22459944/ruby-2-1-1-with-rvm-getting-libyaml-errors

### my setup on osx

1. install homebrew locally

https://github.com/Homebrew/brew/blob/master/docs/Installation.md#installation

cd ~
git clone https://github.com/Homebrew/brew.git
export PATH=${HOME}/brew/bin:${PATH}

2. update ~/.bashrc

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH=${HOME}/brew/bin:${PATH}
export PATH="$PATH:$HOME/.rvm/bin"

3. install rvm

https://rvm.io/rvm/install



## project documentation

* goto `30_source/ZSUPP_Tools`
Expand Down
2 changes: 1 addition & 1 deletion 30_sources/SRC_Zupfnoter/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ gem 'graphviz'
gem 'bundler'
gem 'redcarpet'
gem 'json-schema-generator'
gem 'wortsammler'
gem 'wortsammler', "~> 1.0.2"
gem 'neatjson'
12 changes: 4 additions & 8 deletions 30_sources/SRC_Zupfnoter/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ GEM
multi_json (1.12.1)
neatjson (0.8.3)
nokogiri (1.5.10)
nokogiri (1.5.10-x86-mingw32)
opal (0.9.0)
hike (~> 1.2)
sourcemap (~> 0.1.0)
Expand All @@ -31,10 +30,10 @@ GEM
rack (1.6.4)
rake (10.4.2)
redcarpet (2.2.2)
rubyXL (3.3.21)
rubyXL (3.3.23)
nokogiri (>= 1.4.4)
rubyzip (>= 1.1.6)
rubyzip (1.2.0)
rubyzip (1.2.1)
sass (3.4.20)
slop (3.6.0)
sourcemap (0.1.1)
Expand All @@ -45,7 +44,7 @@ GEM
treetop (1.6.8)
polyglot (~> 0.3)
vector2d (2.1.0)
wortsammler (1.0.1)
wortsammler (1.0.2)
diffy (~> 2.1.3)
logger
nokogiri (= 1.5.10)
Expand All @@ -70,8 +69,5 @@ DEPENDENCIES
redcarpet
sass
vector2d (~> 2.1.0)
wortsammler
wortsammler (~> 1.0.2)
zip

BUNDLED WITH
1.13.6
Binary file not shown.
27 changes: 19 additions & 8 deletions 30_sources/SRC_Zupfnoter/public/locale/de-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
"AnnotationRef": "Ref. Notenbeschriftung",
"annotations": "Notenbeschriftungsvorlagen",
"autopos": "automat. positionieren",
"bad characters in filename": "Fehlerhafte Zeichen im Filenamen",
"barnumbers and countnotes": "Taktnummer und Zählmarken",
"barnumbers": "Taktnummern",
"barnumbers.full": "Taktnummern.detail",
Expand Down Expand Up @@ -201,6 +202,7 @@
"DURATION_TO_STYLE": "Dauer-zu-Zeit",
"Edit addon on cursor position": "Zusatzinformation bearbeiten",
"Edit Addon": "Zusatz bearbeiten ",
"Edit annotations of an extract": "Beschriftung der Auszüge bearbeiten",
"edit barnumbers or countnotes": "Taktnummern und Zählmarken bearbeiten",
"Edit basic settings of extract": "Grundeinstellungen bearbeiten",
"Edit Config": "Konfig. bearbeiten",
Expand Down Expand Up @@ -232,8 +234,10 @@
"Extract 3": "Auszug 3",
"Extract": "Auszug",
"extract": "Auszug",
"Extract-Annotation": "Auszugsbeschriftung",
"Filename not specified in song add an F: instruction": "Kein Filename angegeben. Bitte füge eine F: - Kopfzeile hinzu",
"filenamepart": "Filename-Zusatz",
"Filename not specified in song add an F: instruction": "Keine Filename angegeben. Bitte füge eine F: - Kopfzeile hinzu",
"Files saved to dropbox": "Dateien in Dropbox gespeichert",
"fit to viewport": "in Anzeigebereich\neinpassen",
"fit": "eingepasst",
"Flowline": "Flußlinie",
Expand All @@ -256,10 +260,10 @@
"Id": "Identifikationsnummer",
"in distance": "Abstand der Eingangslinie",
"inject the default configuration (for development use only)": "inject the default configuration (for development use only)",
"Interact with dropbox": "Arbeiten mit Dropbox",
"insert a title for the \ncurrent extract": "Titel für den aktuellen\n Auszug einfügen",
"Insert addon at cursor position": "Zusatzinformation an der Cursor-Position einfügen",
"Insert Addon": "Zusatz einfügen",
"Interact with dropbox": "Arbeiten mit Dropbox",
"italic": "kursiv",
"jumplines": "Sprunglinien",
"jumptarget": "Sprungziel",
Expand All @@ -280,22 +284,24 @@
"LINE_MEDIUM": "Linienstärke mittel",
"LINE_THICK": "Linienstärke dick",
"LINE_THIN": "Linienstärke dünn",
"logged out from dropbox": "Du hast dich aus Dropbox ausgeloggt",
"logged out": "ausgeloggt",
"Login in dropbox;\nchoose folder in Dropbox": "In Dropbox einloggen;\nOrdner in Dropbox wählen",
"Login": "Einloggen",
"Logout from Dropbox": "bei Dropbox ausloggen",
"Logout": "Ausloggen",
"Lost Access token. This should not happen. Please file a bug report.": "Zugriffstoken verloren. Das sollte nicht passieren. Bitte kontaktiere Zupfnoter-Entwicklung",
"lyrics": "Liedtexte",
"Manual": "Benutzerhandbuch",
"marks": "Saitenmarken",
"medium view\nmost commonly used\nautoscroll works": "normale Größe\nmeistgenutzte Darstellunge\nautmatisches Scrollen\nfunktioniert",
"medium": "normal",
"minc": "extra Vorschub",
"minc_f": "Faktor",
"missing pos": "Positionsangabe fehlt",
"missing text": "Text fehlt",
"MM_PER_POINT": "MM pro point",
"more than one line found for ": "Mehr als eine Zeile gefunden für ",
"minc": "extra Vorschub",
"minc_f": "Faktor",
"Multiple parts for same note": "Mehrere Part-Angaben [P:] für eine Note",
"Multiple remarks for same note": "Mehrere Verschiebemarken [r: ]für eine Note",
"Name of annotation": "Name der Beschriftungsvorlage",
Expand All @@ -305,6 +311,7 @@
"Nested Tuplet": "verschachtelte N-tolen",
"New Entry": "Neuer Eintrag",
"New": "Neu",
"No access token to revoke": "Kein Zugriffstoken vorhanden, das gelöscht werden kann.",
"nonflowrest": "Begleitpausen",
"notebound annotation": "Notenbezogene Beschriftung",
"notebound": "Notenbezogen",
Expand All @@ -314,9 +321,12 @@
"Open a demo sheet\n(Ich steh an deiner Kripen hier)": "Öffne ein neues\nZupfnoter-Fenster mit\neinem Demonstrationsstück\n(Ich steh an deiner Krippen hier)",
"Open a new Zupfnoter window\nwith the reference page": "Öffne ein neues\nZupfnoter-Fenster mit\neiner Erklärung\nder Zupfnoter-Ausgabe",
"Open ABC file in dropbox": "ABC-File in Dropbox öffnen",
"Open an ABC tutorial (in German)": "Öffne ABC - Einfürung\nin Deutsch",
"abc Tutorial concise": "ABC Tutorial kompakt",
"abc Tutorial detail": "ABC Tutorial ausführlich",
"Open a detailed ABC tutorial (in German)": "Kompaktes Tutorial von Penzeng öffnen (Deutsch)",
"Open an concise ABC tutorial (in German)": "Ausführliches Tutorial von Schacherl öffnen (Deutsch)",
"Open the user manual": "Öffne das Zupfnoter Benutzerhandbuch",
"Open the version information on website": "Vesionsinformaitonen anzeigen",
"Open the version information on website": "Vesionsinformationen anzeigen",
"Open the video tutorials on youtube": "Schulungsvideos auf\nYouTube",
"Open Zupfnoter website": "Öffne die Zupfnoter - Homepage",
"Open": "Öffnen",
Expand Down Expand Up @@ -369,7 +379,6 @@
"rests as V 1.3": "Pausen wie in V. 1.3",
"right": "rechts",
"Save ABC file in dropbox": "ABC-File in Dropbox speichern",
"Files saved to dropbox": "Dateien in Dropbox gespeichert",
"set screen perspective": "Bildschirmansicht wählen",
"shape": "Linienform",
"Shifter": "links/rechts Verschiebung",
Expand Down Expand Up @@ -460,6 +469,8 @@
"Y_SCALE": "Vertikale Skalierung",
"you are not logged in to dropbox": "Du bist nicht bei Dropbox angemeldet",
"you need to logout if you want to change the application scope": "Du musst dich abmelden um den Zugriffstyp zu ändern",
"Zombie Accesstoken revoked; do not use Browser back after login to dropbox": "Zombie Zugriffstoken gelöscht. Bitte drücke nicht die ZURÜCK-Taste des Borwsers nach dem Einloggen in Dropbox.",
"Zombie token or zombie login occured. Maybe you hit the back button in the browser.": "Zombie Zugriffstoken oder login aufgetreten. Bitte drücke nicht die ZURÜCK-Taste des Borwsers nach dem Einloggen in Dropbox.",
"zoom harpnote preview": "Zoom in Vorschau der Harfennoten",
"value": "Wert",
"+: lyric without music": "+: Liedtext ohne Musik",
Expand Down Expand Up @@ -504,7 +515,7 @@
"Bad page width $1": "fehlerhafte Seitenbreite $1",
"Bad scale value in %%font": "fehlerhafter scale - Wert in %%font",
"Bad stafflines= value": "fehlerhafter Wert für stafflines=",
"Bad tie": "fehlerhafter Bindebogen",
"Bad tie": "fehlerhafter Haltebogen",
"Bad user character '$1'": "falsches benutzerdefiniertes Zeichen '$1' in U:/%%user",
"Bad value '$1' in %%linebreak - ignored": "fehlerhafter Wert '$1' in %%linebreak - ignoriert",
"Bad value for %%$1": "fehlerhafter Wert für %%$1",
Expand Down
27 changes: 22 additions & 5 deletions 30_sources/SRC_Zupfnoter/src/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OUTFOLDER = "../deploy_files"
INDEXFILE = "index.html"
LOCALEPATH = "../public/locale/"

GITSHA = %x{git log --pretty=format:'%h' -n 1} # http://stackoverflow.com/questions/949314/how-to-retrieve-the-hash-for-the-current-commit-in-git
GITSHA = %x{git log --pretty=format:'%h' -n 1} # http://stackoverflow.com/questions/949314/how-to-retrieve-the-hash-for-the-current-commit-in-git

VENDORFOLDER ="../vendor"
ACE_REPO = "../../../../200_zupfnoter_external_components/ace"
Expand All @@ -24,12 +24,12 @@ task :updateLocales do
puts "updating locales"
locales = Dir["#{LOCALEPATH}??-??.json"].map { |f| f.split(LOCALEPATH).last }
locales.each do |locale|
w2uilocalefile = File.open("#{VENDORFOLDER}/w2ui/dist/#{locale}")
znlocalefile = File.open("localization/zupfnoter_#{locale}")
w2uilocalefile = File.open("#{VENDORFOLDER}/w2ui/dist/#{locale}")
znlocalefile = File.open("localization/zupfnoter_#{locale}")
abc2svglocalefile = File.open("localization/abc2svg_#{locale}")

w2uilocales = JSON.parse(w2uilocalefile.read)
znlocales = JSON.parse(znlocalefile.read)
w2uilocales = JSON.parse(w2uilocalefile.read)
znlocales = JSON.parse(znlocalefile.read)
abc2svglocales = JSON.parse(abc2svglocalefile.read)

w2uilocales['phrases'].merge!(znlocales['phrases'])
Expand Down Expand Up @@ -256,6 +256,23 @@ task :buildDesktop => [:build] do
#nw_file.add "../public/icons/favicon.gif", "#{OUTFOLDER}/webserver/public/icons/favicon.gif"
end

desc "create user manual"
task :buildUserManual do

require "#{File.dirname(__FILE__)}/version.rb"
File.open("../../UD_Zupfnoter-Handbuch/000_UD-Zupfnoter-Version.md", "w") do |f|
f.puts (%Q{
Version #{VERSION}
#{COPYRIGHT}
})
end

cd "../../ZSUPP_Tools" do
sh "bundle exec rake UD"
cp "../ZGEN_Documents/UD_Zupfnoter-Handbuch-de_review.pdf", "../SRC_Zupfnoter/public"
end
end

desc "config doc and help"
task :buildConfigDoc do
Expand Down
19 changes: 18 additions & 1 deletion 30_sources/SRC_Zupfnoter/src/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def initialize
uri = self.class.get_uri
mode = uri[:parsed_search][:mode].last rescue :work

cleanup_localstorage
load_from_loacalstorage
set_status(dropbox: "not connected", music_model: "unchanged", loglevel: $log.loglevel, autorefresh: :off, view: 0, mode: mode) unless @systemstatus[:view]
set_status(mode: mode)
Expand Down Expand Up @@ -237,14 +238,30 @@ def load_from_uri(url)

# load session from localstore
def load_from_loacalstorage
abc = Native(`localStorage.getItem('abc_data')`)
abc = Native(`localStorage.getItem('abc_data')`)
@editor.set_text(abc) unless abc.nil?
envelope = JSON.parse(`localStorage.getItem('systemstatus')`)
set_status(envelope) if envelope
nil
end

# this does a cleanip of localstorage
# note that this is maintained from version to version
def cleanup_localstorage
keys = `Object.keys(localStorage)`
dbx_apiv1_traces = keys.select{|k| k.match(/dropbox\-auth:default:/)}
unless dbx_apiv1_traces.empty?
%x{
debugger;
localStorage.removeItem(#{dbx_apiv1_traces.first});
localStorage.removeItem('systemstatus');
}
end

%x{localStorage.setItem('zupfnoterVersion', #{VERSION})}
nil
end

# this loads a demo song
def load_demo_tune
abc = %Q{X:21
Expand Down
Loading

0 comments on commit a055d52

Please sign in to comment.