Browse Source

Merge pull request #48 from patacrep/patacrep

Changement du nom en Patacrep
pull/54/head
Louis 11 years ago
parent
commit
50b2d3f589
  1. 2
      NEWS
  2. 0
      patacrep/__init__.py
  3. 0
      patacrep/authors.py
  4. 9
      patacrep/build.py
  5. 6
      patacrep/content/__init__.py
  6. 4
      patacrep/content/cwd.py
  7. 2
      patacrep/content/section.py
  8. 8
      patacrep/content/song.py
  9. 2
      patacrep/content/songsection.py
  10. 6
      patacrep/content/sorted.py
  11. 4
      patacrep/content/tex.py
  12. 2
      patacrep/data/examples/README
  13. 0
      patacrep/data/examples/example-all.sb
  14. 0
      patacrep/data/examples/example-crepbook.sb
  15. 0
      patacrep/data/examples/example-layout.sb
  16. 0
      patacrep/data/examples/example-songs.sb
  17. 0
      patacrep/data/examples/example.sb
  18. 0
      patacrep/data/examples/img/README
  19. 0
      patacrep/data/examples/img/treble_a.png
  20. 0
      patacrep/data/examples/latex/README
  21. 0
      patacrep/data/examples/songs/README
  22. 0
      patacrep/data/examples/songs/_lilypond/header
  23. 0
      patacrep/data/examples/songs/chevaliers_de_la_table_ronde.sg
  24. 0
      patacrep/data/examples/songs/example-en.sg
  25. 0
      patacrep/data/examples/songs/example-fr.sg
  26. 0
      patacrep/data/examples/songs/greensleeves.ly
  27. 0
      patacrep/data/examples/songs/greensleeves.sg
  28. 0
      patacrep/data/examples/songs/traditionnel.jpg
  29. 0
      patacrep/data/examples/songs/vent_frais.sg
  30. 0
      patacrep/data/examples/templates/README
  31. 0
      patacrep/data/latex/chords.sty
  32. 10
      patacrep/data/latex/crepbook.sty
  33. 4
      patacrep/data/latex/patacrep.sty
  34. 0
      patacrep/data/latex/songs.sty
  35. 0
      patacrep/data/latex/tabs.sty
  36. 4
      patacrep/data/templates/default.tex
  37. 2
      patacrep/data/templates/layout.tex
  38. 2
      patacrep/data/templates/patacrep.tex
  39. 4
      patacrep/data/templates/songs.tex
  40. 0
      patacrep/errors.py
  41. 0
      patacrep/files.py
  42. 4
      patacrep/index.py
  43. 0
      patacrep/plastex.py
  44. 0
      patacrep/plastex_chord.py
  45. 0
      patacrep/plastex_patchedbabel.py
  46. 2
      patacrep/plastex_songs.py
  47. 4
      patacrep/songs.py
  48. 2
      patacrep/templates.py
  49. 14
      readme.md
  50. 12
      setup.py
  51. 6
      songbook

2
NEWS

@ -4,7 +4,7 @@ songbook 3.7.2
songbook 3.4.7 to 3.7.1
Mainly new songs in the data (which was included in songbook-core at this
Mainly new songs in the data (which was included in songbook at this
time), and a few undocumented bug corrections and improvements.
songbook (v0.8)

0
songbook_core/__init__.py → patacrep/__init__.py

0
songbook_core/authors.py → patacrep/authors.py

9
songbook_core/build.py → patacrep/build.py

@ -9,12 +9,9 @@ import logging
import os.path
from subprocess import Popen, PIPE, call
from songbook_core import __DATADIR__
from songbook_core import authors
from songbook_core import content
from songbook_core import errors
from songbook_core.index import process_sxd
from songbook_core.templates import TexRenderer
from patacrep import __DATADIR__, authors, content, errors
from patacrep.index import process_sxd
from patacrep.templates import TexRenderer
LOGGER = logging.getLogger(__name__)
EOL = "\n"

6
songbook_core/content/__init__.py → patacrep/content/__init__.py

@ -74,8 +74,8 @@ import logging
import os
import re
from songbook_core import files
from songbook_core.errors import SongbookError
from patacrep import files
from patacrep.errors import SongbookError
LOGGER = logging.getLogger(__name__)
EOL = '\n'
@ -143,7 +143,7 @@ def load_plugins():
for name in glob.glob(os.path.join(os.path.dirname(__file__), "*.py")):
if name.endswith(".py") and os.path.basename(name) != "__init__.py":
plugin = importlib.import_module(
'songbook_core.content.{}'.format(
'patacrep.content.{}'.format(
os.path.basename(name[:-len('.py')])
)
)

4
songbook_core/content/cwd.py → patacrep/content/cwd.py

@ -5,7 +5,7 @@
import os
from songbook_core.content import process_content
from patacrep.content import process_content
#pylint: disable=unused-argument
def parse(keyword, config, argument, contentlist):
@ -16,7 +16,7 @@ def parse(keyword, config, argument, contentlist):
- config: the current songbook configuration dictionary;
- argument: a directory;
- contentlist: songbook content, that is parsed by
songbook_core.content.process_content().
patacrep.content.process_content().
This function adds 'argument' to the directories where songs are searched
for, and then processes the content.

2
songbook_core/content/section.py → patacrep/content/section.py

@ -3,7 +3,7 @@
"""Allow LaTeX sections (starred or not) as content of a songbook."""
from songbook_core.content import Content, ContentError
from patacrep.content import Content, ContentError
KEYWORDS = [
"part",

8
songbook_core/content/song.py → patacrep/content/song.py

@ -8,9 +8,9 @@ import jinja2
import logging
import os
from songbook_core.content import Content, process_content, ContentError
from songbook_core import files
from songbook_core.songs import Song
from patacrep.content import Content, process_content, ContentError
from patacrep import files
from patacrep.songs import Song
LOGGER = logging.getLogger(__name__)
@ -99,7 +99,7 @@ class OnlySongsError(ContentError):
def process_songs(content, config=None):
"""Process content that containt only songs.
Call songbook_core.content.process_content(), checks if the returned list
Call patacrep.content.process_content(), checks if the returned list
contains only songs, and raise an exception if not.
"""
contentlist = process_content(content, config)

2
songbook_core/content/songsection.py → patacrep/content/songsection.py

@ -3,7 +3,7 @@
"""Allow 'songchapter' and 'songsection' as content of a songbook."""
from songbook_core.content import Content, ContentError
from patacrep.content import Content, ContentError
KEYWORDS = [
"songchapter",

6
songbook_core/content/sorted.py → patacrep/content/sorted.py

@ -10,9 +10,9 @@ to a songbook.
import locale
import logging
from songbook_core import files
from songbook_core.content import ContentError
from songbook_core.content.song import OnlySongsError, process_songs
from patacrep import files
from patacrep.content import ContentError
from patacrep.content.song import OnlySongsError, process_songs
LOGGER = logging.getLogger(__name__)

4
songbook_core/content/tex.py → patacrep/content/tex.py

@ -6,8 +6,8 @@
import logging
import os
from songbook_core import files
from songbook_core.content import Content
from patacrep import files
from patacrep.content import Content
LOGGER = logging.getLogger(__name__)

2
songbook_core/data/examples/README → patacrep/data/examples/README

@ -1,3 +1,3 @@
Run the following command to build an example song book.
$ PATH/TO/songbook.py example.sb
$ songbook example.sb

0
songbook_core/data/examples/example-all.sb → patacrep/data/examples/example-all.sb

0
songbook_core/data/examples/example-patacrep.sb → patacrep/data/examples/example-crepbook.sb

0
songbook_core/data/examples/example-layout.sb → patacrep/data/examples/example-layout.sb

0
songbook_core/data/examples/example-songs.sb → patacrep/data/examples/example-songs.sb

0
songbook_core/data/examples/example.sb → patacrep/data/examples/example.sb

0
songbook_core/data/examples/img/README → patacrep/data/examples/img/README

0
songbook_core/data/examples/img/treble_a.png → patacrep/data/examples/img/treble_a.png

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

0
songbook_core/data/examples/latex/README → patacrep/data/examples/latex/README

0
songbook_core/data/examples/songs/README → patacrep/data/examples/songs/README

0
songbook_core/data/examples/songs/_lilypond/header → patacrep/data/examples/songs/_lilypond/header

0
songbook_core/data/examples/songs/chevaliers_de_la_table_ronde.sg → patacrep/data/examples/songs/chevaliers_de_la_table_ronde.sg

0
songbook_core/data/examples/songs/example-en.sg → patacrep/data/examples/songs/example-en.sg

0
songbook_core/data/examples/songs/example-fr.sg → patacrep/data/examples/songs/example-fr.sg

0
songbook_core/data/examples/songs/greensleeves.ly → patacrep/data/examples/songs/greensleeves.ly

0
songbook_core/data/examples/songs/greensleeves.sg → patacrep/data/examples/songs/greensleeves.sg

0
songbook_core/data/examples/songs/traditionnel.jpg → patacrep/data/examples/songs/traditionnel.jpg

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

0
songbook_core/data/examples/songs/vent_frais.sg → patacrep/data/examples/songs/vent_frais.sg

0
songbook_core/data/examples/templates/README → patacrep/data/examples/templates/README

0
songbook_core/data/latex/chords.sty → patacrep/data/latex/chords.sty

10
songbook_core/data/latex/crepbook.sty → patacrep/data/latex/crepbook.sty

@ -3,10 +3,10 @@
% This package is intended to be used with the songbook Python program (and its
% interfaces).
% It defines some layout for automatic songbook generation.
% See http://github.com/patacrep/songbook-core/
% See http://github.com/patacrep/patacrep/
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{crepbook}[2014/04/13 Crepbook Package, version 0.1]
\ProvidesPackage{crepbook}[2014/06/17 Crepbook Package, version 1]
% fancy-capo: When a capo is necessary, use a picture instead of text.
\newif{\iffancycapo}
@ -22,12 +22,12 @@
\customfontstrue
\DeclareOption{nocustomfonts}{\customfontsfalse}
% Remaining options are passed to the SongbookUtils package
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{SongbookUtils}}
% Remaining options are passed to the main Patacrep package
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{patacrep}}
\ProcessOptions\relax
\RequirePackage{SongbookUtils}
\RequirePackage{patacrep}
\ifpictures
\fancycapotrue

4
songbook_core/data/latex/SongbookUtils.sty → patacrep/data/latex/patacrep.sty

@ -1,10 +1,10 @@
% Songbook Package -- version 0.1 for LaTeX2e
%
% This package provides macro for automatic songbook
% generation. See http://github.com/patacrep/songbook-core/
% generation. See http://github.com/patacrep/patacrep/
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{SongbookUtils}[2014/04/13 Songbook Package, version 0.1]
\ProvidesPackage{patacrep}[2014/06/17 Patacrep Package, version 1]
\RequirePackage{graphicx,xcolor} %
\RequirePackage{epstopdf} %

0
songbook_core/data/latex/songs.sty → patacrep/data/latex/songs.sty

0
songbook_core/data/latex/tabs.sty → patacrep/data/latex/tabs.sty

4
songbook_core/data/templates/default.tex → patacrep/data/templates/default.tex

@ -1,4 +1,4 @@
%! Copyright (C) 2014 The Songbook team (www.patacrep.com)
%! Copyright (C) 2014 The Patacrep team (www.patacrep.com)
%!
%! This program is free software; you can redistribute it and/or
%! modify it under the terms of the GNU General Public License
@ -32,7 +32,7 @@
"mandatory":true
},
"author": {"description": {"english": "Author", "french": "Auteur"},
"default": {"english": "The Songbook Team", "french": "L'équipe Songbook"},
"default": {"english": "The Patacrep Team", "french": "L'équipe Patacrep"},
"mandatory":true
},
"subtitle": {"description": {"english": "Subtitle", "french": "Sous-titre"},

2
songbook_core/data/templates/layout.tex → patacrep/data/templates/layout.tex

@ -1,4 +1,4 @@
%! Copyright (C) 2014 The Songbook team (www.patacrep.com)
%! Copyright (C) 2014 The Patacrep team (www.patacrep.com)
%!
%! This program is free software; you can redistribute it and/or
%! modify it under the terms of the GNU General Public License

2
songbook_core/data/templates/patacrep.tex → patacrep/data/templates/patacrep.tex

@ -1,4 +1,4 @@
%! Copyright (C) 2014 The Songbook team (www.patacrep.com)
%! Copyright (C) 2014 The Patacrep team (www.patacrep.com)
%!
%! This program is free software; you can redistribute it and/or
%! modify it under the terms of the GNU General Public License

4
songbook_core/data/templates/songs.tex → patacrep/data/templates/songs.tex

@ -1,4 +1,4 @@
%! Copyright (C) 2014 The Songbook team (www.patacrep.com)
%! Copyright (C) 2014 The Patacrep team (www.patacrep.com)
%!
%! This program is free software; you can redistribute it and/or
%! modify it under the terms of the GNU General Public License
@ -64,7 +64,7 @@
(* for option in bookoptions *)((option)),
(* endfor *)
(* for instrument in instruments *)((instrument)),
(* endfor *)]{SongbookUtils}
(* endfor *)]{patacrep}
(* endblock *)
(* block songbookpreambule *)

0
songbook_core/errors.py → patacrep/errors.py

0
songbook_core/files.py → patacrep/files.py

4
songbook_core/index.py → patacrep/index.py

@ -13,8 +13,8 @@ import locale
import re
import codecs
from songbook_core import authors
from songbook_core.plastex import simpleparse
from patacrep import authors
from patacrep.plastex import simpleparse
EOL = u"\n"

0
songbook_core/plastex.py → patacrep/plastex.py

0
songbook_core/plastex_chord.py → patacrep/plastex_chord.py

0
songbook_core/plastex_patchedbabel.py → patacrep/plastex_patchedbabel.py

2
songbook_core/plastex_songs.py → patacrep/plastex_songs.py

@ -6,7 +6,7 @@
import plasTeX
from songbook_core.plastex import process_unbr_spaces
from patacrep.plastex import process_unbr_spaces
def split_linebreak(texlist):

4
songbook_core/songs.py → patacrep/songs.py

@ -6,8 +6,8 @@
from unidecode import unidecode
import re
from songbook_core.authors import processauthors
from songbook_core.plastex import parsetex
from patacrep.authors import processauthors
from patacrep.plastex import parsetex
# pylint: disable=too-few-public-methods
class Song(object):

2
songbook_core/templates.py → patacrep/templates.py

@ -11,7 +11,7 @@ import os
import re
import json
from songbook_core import errors
from patacrep import errors
_LATEX_SUBS = (
(re.compile(r'\\'), r'\\textbackslash'),

14
readme.md

@ -16,24 +16,24 @@ is precised in the header.
# Python version
Songbook is compatible with Python 2.7 (no Python3 since [one of the
Patacrep is compatible with Python 2.7 (no Python3 since [one of the
library](http://plastex.sourceforge.net/) we are using is not).
# Download
Clone Patacrep repos:
> git clone git://github.com/crep4ever/songbook-core.git
> git clone git://github.com/crep4ever/songbook-data.git
> git clone git://github.com/patacrep/patacrep.git
> git clone git://github.com/patacrep/patadata.git
# Run
> <songbook-core>/songbook <songbook_file.sb>
> <patacrep>/songbook <songbook_file.sb>
> <pdfreader> <songbook_file.pdf>
Look for existing songbook files in <songbook-data>/books. For example:
Look for existing songbook files in `<patadata>/books/`. For example:
> <songbook-core>/songbook <songbook-data>/books/songbook_en.sb
> <patacrep>/songbook <patadata>/books/songbook_en.sb
> <pdfreader> songbook_en.pdf
# Quick and dirty deb packages
@ -41,7 +41,7 @@ Look for existing songbook files in <songbook-data>/books. For example:
Install `python-stdeb`, then:
> python setup.py --command-packages=stdeb.command bdist_deb
> sudo dpkg -i deb_dist/python-songbook-core_<version>-1_all.deb
> sudo dpkg -i deb_dist/python-patacrep_<version>-1_all.deb
# Documentation

12
setup.py

@ -6,7 +6,7 @@ $ python setup.py install
"""
from distutils.core import setup
from distutils.command.install import install as _install
from songbook_core import __STR_VERSION__
from patacrep import __STR_VERSION__
import sys
import os
@ -44,13 +44,13 @@ class install(_install):
setup(cmdclass={'install': install},
name='songbook-core',
name='patacrep',
version=__STR_VERSION__,
description='Songbook compilation chain',
author='The Songbook team',
author='The Patacrep team',
author_email='crep@team-on-fire.com',
url='https://github.com/patacrep/songbook-core',
packages=['songbook_core'],
url='https://github.com/patacrep/patacrep',
packages=['patacrep'],
license="GPLv2 or any later version",
scripts=['songbook'],
requires=[
@ -58,7 +58,7 @@ setup(cmdclass={'install': install},
"locale", "logging", "os", "plasTeX", "re", "subprocess", "sys",
"textwrap", "unidecode", "jinja2"
],
package_data={'songbook_core': ['data/latex/*',
package_data={'patacrep': ['data/latex/*',
'data/templates/*',
'data/examples/*.sb',
'data/examples/*/*.sg',

6
songbook

@ -12,9 +12,9 @@ import os.path
import textwrap
import sys
from songbook_core.build import SongbookBuilder, DEFAULT_STEPS
from songbook_core import __STR_VERSION__
from songbook_core import errors
from patacrep.build import SongbookBuilder, DEFAULT_STEPS
from patacrep import __STR_VERSION__
from patacrep import errors
# Logging configuration
logging.basicConfig(level=logging.INFO)

Loading…
Cancel
Save