Skip to content

Commit

Permalink
📚 add Modernist
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Feb 14, 2022
1 parent f76e8be commit a369a0f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .moban.d/one-liners.rst.jj2
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Get a list of dictionaries
... Classical,c.1750-c.1830,"Joseph Haydn, Wolfgan Amadeus Mozart"
... Early Romantic,c.1830-c.1860,"Chopin, Mendelssohn, Schumann, Liszt"
... Late Romantic,c.1860-c.1920,"Wagner,Verdi"
... Modernist,20th century,"Sergei Rachmaninoff,Calude Debussy"
... """.strip()
>>> sheet = p.get_sheet(file_content=content, file_type='csv')
>>> sheet.save_as("your_file.xls")
Expand All @@ -44,6 +45,7 @@ Suppose you want to process `History of Classical Music <https://www.naxos.com/e
Classical,c.1750-c.1830,"Joseph Haydn, Wolfgan Amadeus Mozart"
Early Romantic,c.1830-c.1860,"Chopin, Mendelssohn, Schumann, Liszt"
Late Romantic,c.1860-c.1920,"Wagner,Verdi"
Modernist,20th century,"Sergei Rachmaninoff,Calude Debussy"


{% else %}
Expand All @@ -58,6 +60,7 @@ Baroque c.1600-c.1750 JS Bach, Vivaldi
Classical c.1750-c.1830 Joseph Haydn, Wolfgan Amadeus Mozart
Early Romantic c.1830-c.1860 Chopin, Mendelssohn, Schumann, Liszt
Late Romantic c.1860-c.1920 Wagner,Verdi
Modernist 20th century Sergei Rachmaninoff,Calude Debussy
=============== ============= ====================================

{% endif %}
Expand All @@ -80,6 +83,7 @@ And let's check what do we have:
Joseph Haydn, Wolfgan Amadeus Mozart are from Classical period (c.1750-c.1830)
Chopin, Mendelssohn, Schumann, Liszt are from Earley Romantic period (c.1830-c.1860)
Wagner,Verdi are from Late Romantic period (c.1860-c.1920)
Sergei Rachmaninoff,Calude Debussy are from Modernist period (20th century)


Get two dimensional array
Expand All @@ -97,6 +101,7 @@ Instead, what if you have to use `pyexcel.get_array` to do the same:
Joseph Haydn, Wolfgan Amadeus Mozart are from Classical period (c.1750-c.1830)
Chopin, Mendelssohn, Schumann, Liszt are from Earley Romantic period (c.1830-c.1860)
Wagner,Verdi are from Late Romantic period (c.1860-c.1920)
Sergei Rachmaninoff,Calude Debussy are from Modernist period (20th century)


where `start_row` skips the header row.
Expand All @@ -122,9 +127,9 @@ And check what do we have:
True
>>> for key, values in my_dict.items():
... print(key + " : " + ','.join([str(item) for item in values]))
Name : Medieval,Renaissance,Baroque,Classical,Earley Romantic,Late Romantic
Period : c.1150-c.1400,c.1400-c.1600,c.1600-c.1750,c.1750-c.1830,c.1830-c.1860,c.1860-c.1920
Representative Composers : Machaut, Landini,Gibbons, Frescobaldi,JS Bach, Vivaldi,Joseph Haydn, Wolfgan Amadeus Mozart,Chopin, Mendelssohn, Schumann, Liszt,Wagner,Verdi
Name : Medieval,Renaissance,Baroque,Classical,Early Romantic,Late Romantic,Modernist
Period : c.1150-c.1400,c.1400-c.1600,c.1600-c.1750,c.1750-c.1830,c.1830-c.1860,c.1860-c.1920,20th century
Representative Composers : Machaut, Landini,Gibbons, Frescobaldi,JS Bach, Vivaldi,Joseph Haydn, Wolfgan Amadeus Mozart,Chopin, Mendelssohn, Schumann, Liszt,Wagner,Verdi,Sergei Rachmaninoff,Calude Debussy


Please note that my_dict is an OrderedDict.
Expand Down
9 changes: 6 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Baroque c.1600-c.1750 JS Bach, Vivaldi
Classical c.1750-c.1830 Joseph Haydn, Wolfgan Amadeus Mozart
Early Romantic c.1830-c.1860 Chopin, Mendelssohn, Schumann, Liszt
Late Romantic c.1860-c.1920 Wagner,Verdi
Modernist 20th century Sergei Rachmaninoff,Calude Debussy
=============== ============= ====================================


Expand All @@ -176,6 +177,7 @@ And let's check what do we have:
Joseph Haydn, Wolfgan Amadeus Mozart are from Classical period (c.1750-c.1830)
Chopin, Mendelssohn, Schumann, Liszt are from Earley Romantic period (c.1830-c.1860)
Wagner,Verdi are from Late Romantic period (c.1860-c.1920)
Sergei Rachmaninoff,Calude Debussy are from Modernist period (20th century)
Get two dimensional array
Expand All @@ -193,6 +195,7 @@ Instead, what if you have to use `pyexcel.get_array` to do the same:
Joseph Haydn, Wolfgan Amadeus Mozart are from Classical period (c.1750-c.1830)
Chopin, Mendelssohn, Schumann, Liszt are from Earley Romantic period (c.1830-c.1860)
Wagner,Verdi are from Late Romantic period (c.1860-c.1920)
Sergei Rachmaninoff,Calude Debussy are from Modernist period (20th century)
where `start_row` skips the header row.
Expand All @@ -218,9 +221,9 @@ And check what do we have:
True
>>> for key, values in my_dict.items():
... print(key + " : " + ','.join([str(item) for item in values]))
Name : Medieval,Renaissance,Baroque,Classical,Earley Romantic,Late Romantic
Period : c.1150-c.1400,c.1400-c.1600,c.1600-c.1750,c.1750-c.1830,c.1830-c.1860,c.1860-c.1920
Representative Composers : Machaut, Landini,Gibbons, Frescobaldi,JS Bach, Vivaldi,Joseph Haydn, Wolfgan Amadeus Mozart,Chopin, Mendelssohn, Schumann, Liszt,Wagner,Verdi
Name : Medieval,Renaissance,Baroque,Classical,Early Romantic,Late Romantic,Modernist
Period : c.1150-c.1400,c.1400-c.1600,c.1600-c.1750,c.1750-c.1830,c.1830-c.1860,c.1860-c.1920,20th century
Representative Composers : Machaut, Landini,Gibbons, Frescobaldi,JS Bach, Vivaldi,Joseph Haydn, Wolfgan Amadeus Mozart,Chopin, Mendelssohn, Schumann, Liszt,Wagner,Verdi,Sergei Rachmaninoff,Calude Debussy
Please note that my_dict is an OrderedDict.
Expand Down
10 changes: 7 additions & 3 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Get a list of dictionaries
... Classical,c.1750-c.1830,"Joseph Haydn, Wolfgan Amadeus Mozart"
... Early Romantic,c.1830-c.1860,"Chopin, Mendelssohn, Schumann, Liszt"
... Late Romantic,c.1860-c.1920,"Wagner,Verdi"
... Modernist,20th century,"Sergei Rachmaninoff,Calude Debussy"
... """.strip()
>>> sheet = p.get_sheet(file_content=content, file_type='csv')
>>> sheet.save_as("your_file.xls")
Expand All @@ -42,6 +43,7 @@ Suppose you want to process `History of Classical Music <https://www.naxos.com/e
Classical,c.1750-c.1830,"Joseph Haydn, Wolfgan Amadeus Mozart"
Early Romantic,c.1830-c.1860,"Chopin, Mendelssohn, Schumann, Liszt"
Late Romantic,c.1860-c.1920,"Wagner,Verdi"
Modernist,20th century,"Sergei Rachmaninoff,Calude Debussy"



Expand All @@ -63,6 +65,7 @@ And let's check what do we have:
Joseph Haydn, Wolfgan Amadeus Mozart are from Classical period (c.1750-c.1830)
Chopin, Mendelssohn, Schumann, Liszt are from Earley Romantic period (c.1830-c.1860)
Wagner,Verdi are from Late Romantic period (c.1860-c.1920)
Sergei Rachmaninoff,Calude Debussy are from Modernist period (20th century)
Get two dimensional array
Expand All @@ -80,6 +83,7 @@ Instead, what if you have to use `pyexcel.get_array` to do the same:
Joseph Haydn, Wolfgan Amadeus Mozart are from Classical period (c.1750-c.1830)
Chopin, Mendelssohn, Schumann, Liszt are from Earley Romantic period (c.1830-c.1860)
Wagner,Verdi are from Late Romantic period (c.1860-c.1920)
Sergei Rachmaninoff,Calude Debussy are from Modernist period (20th century)
where `start_row` skips the header row.
Expand All @@ -105,9 +109,9 @@ And check what do we have:
True
>>> for key, values in my_dict.items():
... print(key + " : " + ','.join([str(item) for item in values]))
Name : Medieval,Renaissance,Baroque,Classical,Earley Romantic,Late Romantic
Period : c.1150-c.1400,c.1400-c.1600,c.1600-c.1750,c.1750-c.1830,c.1830-c.1860,c.1860-c.1920
Representative Composers : Machaut, Landini,Gibbons, Frescobaldi,JS Bach, Vivaldi,Joseph Haydn, Wolfgan Amadeus Mozart,Chopin, Mendelssohn, Schumann, Liszt,Wagner,Verdi
Name : Medieval,Renaissance,Baroque,Classical,Early Romantic,Late Romantic,Modernist
Period : c.1150-c.1400,c.1400-c.1600,c.1600-c.1750,c.1750-c.1830,c.1830-c.1860,c.1860-c.1920,20th century
Representative Composers : Machaut, Landini,Gibbons, Frescobaldi,JS Bach, Vivaldi,Joseph Haydn, Wolfgan Amadeus Mozart,Chopin, Mendelssohn, Schumann, Liszt,Wagner,Verdi,Sergei Rachmaninoff,Calude Debussy
Please note that my_dict is an OrderedDict.
Expand Down

0 comments on commit a369a0f

Please sign in to comment.