-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
5,027 additions
and
4,019 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title> | ||
新しいindex.htmlのテスト | ||
</title> | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="../css/default.css" > | ||
|
||
<style type="text/css"> | ||
</style> | ||
|
||
<!-- highlight.js --> | ||
<link rel="stylesheet" type="text/css" href="../css/github.css"> | ||
<script type="text/javascript" src="../js/highlight.pack.js"></script> | ||
<script type="text/javascript">hljs.initHighlightingOnLoad();</script> | ||
|
||
<!-- mathjax CDN --> | ||
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML' async> | ||
</script> | ||
|
||
|
||
</head> | ||
|
||
<body> | ||
|
||
<header> | ||
<h1><a href="https://ezoeryou.github.io/blog/">本の虫</a></h1> | ||
|
||
<p> | ||
著者:江添亮<br>GitHub pages: <a href="https://ezoeryou.github.io/blog/">https://ezoeryou.github.io/blog/</a><br> | ||
Blogger: <a href="http://cpplover.blogspot.jp/">http://cpplover.blogspot.jp/</a><br> | ||
メール: [email protected]<br> | ||
Twitter: <a href="https://twitter.com/EzoeRyou">https://twitter.com/EzoeRyou</a><br> | ||
GitHub: <a href="https://github.com/EzoeRyou">https://github.com/EzoeRyou</a> | ||
</p> | ||
</header> | ||
|
||
|
||
<article> | ||
<h1> | ||
新しいindex.htmlのテスト | ||
</h1> | ||
|
||
<p> | ||
古いindex.htmlが色々と限界だったので新しいindex.htmlを生成してみた。 | ||
</p> | ||
|
||
|
||
</article> | ||
|
||
<footer> | ||
<p> | ||
CC BY-SA 4.0: This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>. | ||
</p> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$1" ] | ||
then | ||
echo "no argument" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -f "$1" ] | ||
then | ||
echo "No such file: " $1 | ||
exit 1 | ||
fi | ||
|
||
title="$(sed '6q;d' $1)" | ||
|
||
filename="$1" | ||
filename=${filename/draft/$(date -I)} | ||
|
||
entry='<li>\n'$(date -I)': <a href='"$filename"'>'$title"</a>"'\n</li>' | ||
|
||
cur_year="$(date +%Y)" | ||
cur_month="$(date +%m)" | ||
file_year="$(sed '30q;d' index.html)" | ||
file_month="$(sed '36q;d' index.html)" | ||
|
||
if [ $cur_year != $file_year ] | ||
then | ||
sed -i '38a\ | ||
<li>\ | ||
<p>\n'\ | ||
"$cur_year"'\ | ||
</p>\ | ||
\ | ||
<ul>\ | ||
<li>\ | ||
<p>\n'\ | ||
"$cur_month"'\ | ||
</p>\ | ||
\ | ||
<ul>\ | ||
</ul>\ | ||
</ul>\ | ||
</li>\n' index.html | ||
fi | ||
|
||
if [ $cur_month != $file_month ] | ||
then | ||
sed -i '44a\ | ||
<li>\ | ||
<p>\n'\ | ||
"$cur_month"'\ | ||
</p>\ | ||
\ | ||
<ul>\ | ||
</ul>\ | ||
</li>\n' index.html | ||
fi | ||
|
||
sed -i '50a'"$entry" index.html | ||
mv "$1" "$filename" | ||
git add "$filename" | ||
git commit -am "$title" | ||
echo "$title" "https://ezoeryou.github.io/blog/$filename" | xsel -b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
</ul> | ||
|
||
<footer> | ||
<p> | ||
Unless otherwise noted,<br> | ||
<br> | ||
Copyright (C) 2014 江添亮<br> | ||
<br> | ||
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. | ||
</p> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!doctype html> | ||
<html> | ||
<head><meta charset="UTF-8"> | ||
<title> | ||
本の虫@GitHub | ||
</title> | ||
|
||
<link rel="stylesheet" type="text/css" href="css/default.css"></link> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<header> | ||
<h1><a href="https://ezoeryou.github.io/blog/">本の虫</a></h1> | ||
|
||
<p> | ||
著者:江添亮<br> | ||
Blogger: <a href="https://cpplover.blogspot.jp/">https://cpplover.blogspot.jp/</a><br> | ||
メール: [email protected]<br> | ||
Twitter: <a href="https://twitter.com/EzoeRyou">https://twitter.com/EzoeRyou</a><br> | ||
GitHub: <a href="https://github.com/EzoeRyou">https://github.com/EzoeRyou</a> | ||
</p> | ||
</header> | ||
|
||
<ul> | ||
|
Oops, something went wrong.