Compare commits

...

6 Commits

Author SHA1 Message Date
bf5aa870ab Merge commit '726ea3b91f41db4c665cc94305b8d5b7cbe61d15' into jpg 2024-04-08 00:24:24 +02:00
726ea3b91f Squashed 'content/' changes from 61bf995..0ba6983
0ba6983 Added index

git-subtree-dir: content
git-subtree-split: 0ba69837fc65f6c9c2e82762cf10cbd099bacde9
2024-04-08 00:24:24 +02:00
c6f9cd12e0 Added content repo in update script 2024-04-08 00:10:18 +02:00
e86450abd3 Better styling: tables with borders, line breaks 2024-04-08 00:04:39 +02:00
6e29281f91 Merge commit 'd63e5ae6a77e5f39e25d87500c67488ff4570cbc' into jpg 2024-04-07 23:13:27 +02:00
d63e5ae6a7 Squashed 'custom/convert-usage/' changes from 89c8624..bbefbc5
bbefbc5 Added usage
8be4d39 Fixed an issue with character encoding

git-subtree-dir: custom/convert-usage
git-subtree-split: bbefbc5dd202ca299e1760f6934ace79ba320499
2024-04-07 23:13:27 +02:00
9 changed files with 108 additions and 18 deletions

View File

@ -1,9 +0,0 @@
MIT License
Copyright (c) 2024 keb
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,3 +0,0 @@
# jpg-content
Markdown content of the Japanese Grammar (JPG) project

48
content/index.md Normal file
View File

@ -0,0 +1,48 @@
# Japanese Grammar (JPG)
Welcome to my Japanese Grammar project!
## Goal
The goal of this website is to be a synthesis of useful resources for my Japanese learning adventure. I want to have grammar points next to each other, independently of any "difficulty level", set up in a logical and consistent form. I don't want to have to open 5 pages to compare information, and I don't want a deep dive into a notion. The goal is to be a reminder of the things I learn, rather than a way to learn. I want a few examples to grasp it, but I do not want to have ten of the same kind. And nothing quite fits for me!
## Sources
Of course, since I'm _learning_ the language, I need to borrow what I write from different sources. So this website uses data from the websites listed here. I don't want any recognition of what is here! It's mostly a compilation of what people who are way better in this language have made before.
* [Bunpro](https://bunpro.jp/grammar_points)
* [JLPT Sensei](https://jlptsensei.com/#jlpt-grammar-lists)
* [Maggie Sensei](https://maggiesensei.com/)
* [Try! Series of books](https://2024.ask-books.com/tag/try/)
* [Hedgehog Japanese](https://hedgehog-japanese.com/category/grammar/)
* [Wasabi](https://www.wasabi-jpn.com/category/japanese-grammar/)
* [Japanese StackExchange](https://japanese.stackexchange.com/)
* [Guide du Japonais](https://guidedujaponais.fr/)
## Other useful resources
In addition to those I cited, here are other resources I find useful.
### Kanjis
* [Remembering the Kanji (RTK)](https://en.wikipedia.org/wiki/Remembering_the_Kanji_and_Remembering_the_Hanzi), a kanji learning method
* [Kanji Koohii](https://kanji.koohii.com/), a website using the RTK method and spaced repetition
* [Remember the JLPT](https://git.marchal.dev/keb/remember-the-JLPT), a tool I made to learn kanjis by JLPT levels
### Reading
* [Sakubun](https://sakubun.xyz/)
* [NHK News Web Easy](https://www3.nhk.or.jp/news/easy/)
### Grammar
* [jtest4you](https://japanesetest4you.com/)
* [Japanese Conjugation Drill](https://drill.marchal.dev)
### Vocabulary
* [Jisho](https://jisho.org/), an online dictionary
## Any errors?
If you find any error, please do contact me! You can find my website in the footer of any page of this website. Thanks!

View File

@ -9,3 +9,9 @@ For my Japanese Grammar (JPG) project, I have created a style for explanation on
## convert-usage.py
In my Quartz rendering of my markdown data, I want this kind of data to be in a callout. However, it is not possible to combine HTML and Markdown in Obsidian. For that purpose, this script encapsulates it directly in HTML. To make it both compatible in Obsidian and Quartz, and to be still easy to write, it's done with this python script. This is probably super specific and will not be of use for anybody except me!
## Usage
Usage: `python3 convert-usage.py [root folder]`
Note: Please be careful, this software applies modifications recursively!

View File

@ -0,0 +1,23 @@
# test file
## Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris massa eros, feugiat eu dapibus nec, fermentum vel ex. Nulla malesuada luctus pretium. Phasellus ac felis ut nisi lacinia malesuada nec vel odio. Donec tincidunt tincidunt lorem vel tempus. Nullam sed efficitur ligula, a porttitor nibh. Praesent justo dui, venenatis ac mi non, laoreet consequat libero. Aenean ut molestie mauris. Proin mattis volutpat ligula eget tincidunt. Fusce ex eros, condimentum consectetur efficitur vitae, euismod at justo.
**Usage**
<div class="usage">
<div class="left">
<p><span class="box">item1</span></p>
<p><span class="box">item2</span></p>
<p><span class="box">item3</span></p>
<p><span class="box">item4</span></p>
</div>
<p class="right">+ final</p>
</div>
## Callout
> [!info] Example
> Callout example
> Careful with BS4 encoding some characters

View File

@ -29,7 +29,9 @@ def write_file(filename, text):
### Replace ###
def convert_pattern(text):
text = re.sub(re_usage, '', text, flags=re.MULTILINE)
text, success = re.subn(re_usage, '', text, flags=re.MULTILINE)
if (success == 0):
return text
soup = BeautifulSoup(text, features="html.parser")
@ -40,7 +42,7 @@ def convert_pattern(text):
calloutTitle = BeautifulSoup(callout_title_html, features="html.parser")
tag.insert_before(calloutTitle)
return str(soup)
return (soup.decode(False, formatter=None))
### Execution ###

View File

@ -3,3 +3,6 @@ git subtree pull --prefix custom/convert-furigana convert-furigana main --squash
git fetch convert-usage main
git subtree pull --prefix custom/convert-usage convert-usage main --squash
git fetch content main
git subtree pull --prefix content content main --squash

View File

@ -69,7 +69,6 @@ const config: QuartzConfig = {
Plugin.TableOfContents(),
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
Plugin.Description(),
Plugin.HardLineBreaks(),
],
filters: [Plugin.RemoveDrafts()],
emitters: [

View File

@ -27,8 +27,23 @@
--color: #a672c0;
}
.callout.note {
table {
border: 2px solid var(--gray);
& thead > tr {
border-bottom: 2px solid var(--lightgray);
& th {
border: 1px solid var(--lightgray);
}
}
& td {
border: 1px solid var(--lightgray);
}
}
.callout.note {
& table {
margin: 0;
margin-bottom: 0.5rem;
@ -65,6 +80,12 @@ ul.overflow::after, ol.overflow::after {
& .center {
& p {
font-size: 1.15rem;
white-space: break-spaces;
hyphens: none;
}
& li {
font-size: 1.15rem;
}
& h3 {