
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
diary-header
Advanced tools
A command-line tool that generates a Markdown header for daily diary entries with location, astronomical, and weather information
A command-line tool written in Rust that interactively generates a Markdown header for your daily diary entries. It automatically retrieves geolocation data, calculates sunrise/sunset times, and determines the sexagenary cycle (干支 - Eto) for any given date.
~/.config/diary-header/config.toml). You can update this later using the config subcommand.The easiest way to install diary-header is via npm:
npm install -g diary-header
This will download a prebuilt binary for your platform and make the diary-header command available globally.
Alternatively, if you have Rust and Cargo installed, you can install from source:
git clone https://github.com/massn/diary-header.git
cd diary-header
cargo install --path .
Or just run it directly:
cargo run
When you run diary-header (or cargo run), the tool will interactively prompt you for the necessary information:
~/.config/diary-header/config.toml.Once the selections are made, the tool outputs a localized Markdown header depending on your configured language:
Japanese Output (ja):
## 2024-11-20 (水)
- 場所 (Current IP Address): Tokyo (Tokyo)
- 緯度経度: (35.6895, 139.6917)
- タイムゾーン: Asia/Tokyo
- 日の出: 06:21:43 JST+0900
- 日の入り: 16:32:11 JST+0900
- 天気: 晴れ
- 降水確率: 20%
- 気温: 最高 18.5°C / 最低 12.3°C
- 干支: 甲辰
- 六曜: 先勝
English Output (en):
## 2024-11-20 (Wednesday)
- Location (Current IP Address): Tokyo (Tokyo)
- Lat/Lon: (35.6895, 139.6917)
- Timezone: Asia/Tokyo
- Sunrise: 06:21:43 JST+0900
- Sunset: 16:32:11 JST+0900
- Weather: Mainly clear
- Precipitation Probability: 20%
- Temperature: Max 18.5°C / Min 12.3°C
- Sexagenary Cycle: 甲辰
- Rokuyo: 先勝
You can redirect this output directly to your diary file or copy it securely:
diary-header >> my-diary.md
The configuration file is stored in ~/.config/diary-header/config.toml (macOS/Linux) or %APPDATA%\diary-header\config.toml (Windows).
You can interactively change the language setting at any time by using the config subcommand:
diary-header config
# Or with cargo:
cargo run -- config
You can customize the order of displayed information by manually editing the configuration file. By default, all items are displayed in the following order:
language = "en"
display_order = [
"location",
"coordinates",
"timezone",
"sunrise",
"sunset",
"weather",
"precipitation",
"temperature",
"sexagenary_cycle",
"rokuyo",
]
Available items:
location - Location information (city/region)coordinates - Latitude and longitudetimezone - Timezonesunrise - Sunrise timesunset - Sunset timeweather - Weather conditionprecipitation - Precipitation probabilitytemperature - Max/min temperaturesexagenary_cycle - Sexagenary cycle (干支)rokuyo - Six-day cycle (六曜)You can reorder these items or remove items you don't need. For example, to show only weather-related information:
language = "ja"
display_order = [
"weather",
"temperature",
"precipitation",
]
Items not included in display_order will not be displayed in the output.
ip-api.com endpoint to fetch IP-based timezone and geolocation info, and the Open-Meteo API for weather data.The version is managed through package.json, which serves as the single source of truth. The build.rs script automatically reads the version from package.json during compilation.
To create a new release:
Update the version in package.json:
# Edit package.json and update the version field
# Example: "version": "0.1.9"
Update Cargo.toml version (optional but recommended):
# Keep Cargo.toml in sync to avoid confusion
# Example: version = "0.1.9"
Update Cargo.lock:
cargo update -p diary-header
Build and verify the version:
cargo build --release
./target/release/diary-header --version
# Should output: diary-header 0.1.9
Commit the changes:
git add package.json Cargo.toml Cargo.lock
git commit -m "chore: bump version to 0.1.9"
Create a git tag:
git tag -a v0.1.9 -m "Release v0.1.9"
Push to remote:
git push origin main
git push origin v0.1.9
Publish to npm:
npm publish
Note: The version displayed by --version comes from package.json, not from git tags. This ensures consistent versioning across npm packages and the binary.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
A command-line tool that generates a Markdown header for daily diary entries with location, astronomical, and weather information
The npm package diary-header receives a total of 389 weekly downloads. As such, diary-header popularity was classified as not popular.
We found that diary-header demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.