bujo.js
is a customizable library for generating Bullet Journal-style PDFs using JavaScript. It enables users to create organized PDF templates with customizable options, such as cover pages, milestones, undated calendars, planning pages, and more.
- Cover Page: Add a personalized cover page to your journal.
- Index Page: Add an index for easy navigation.
- Undated Calendar Pages: Generate monthly calendar pages without specific dates.
- Top Milestones Pages: Add up to 30 milestones and yearly top 10 milestones.
- Helicopter Overview: Add a high-level overview page for the year.
- Dotted Grid Pages: Include customizable numbers of dotted grid pages.
- Daily Planning Pages: Add daily planning pages for detailed scheduling.
- Weekly Overview Pages: Generate weekly pages to track activities for each day.
- Flexible Tracking Pages: Add a flexible page for habit tracking, goal-setting, and reflections.
- Clone or download the
bujo.js
repository:git clone https://github.com/inkshare/bujo.js.git
- Install dependencies:
npm install
- Import and use
bujo.js
in your project:import { BulletJournal } from './src/bujo.js';
To create a new instance of BulletJournal
, specify the title and color scheme:
const journal = new BulletJournal("My Custom Journal", "monochrome");
-
Add Cover Page:
journal.addCoverPage(doc);
-
Add Index Page:
journal.addIndexPage(doc);
-
Add Undated Calendar Pages:
journal.addUndatedCalendarPages(doc);
-
Add Top Milestones Pages:
journal.addTopMilestonesPage(doc);
-
Add Helicopter Overview Page:
journal.addHelicopterOverviewPage(doc);
-
Add Dotted Grid Pages: Specify the number of pages and dimensions:
const pageCount = 5; // Number of dotted grid pages for (let i = 0; i < pageCount; i++) { journal.addDottedGridPage(doc, 0.2, { width: 8.27, height: 11.69 }); }
-
Add Daily Planning Page:
journal.addDailyPlanningPage(doc, { width: 8.27, height: 11.69 });
-
Add Weekly Overview Page:
journal.addWeeklyOverviewPage(doc, { width: 8.27, height: 11.69 });
-
Add Flexible Tracking Page:
journal.addFlexibleTrackingPage(doc, { width: 8.27, height: 11.69 });
To create a full Bullet Journal with a combination of the above sections:
const doc = new jsPDF();
journal.createBulletJournalBook('A4', doc);
This method will automatically add sections based on a standard format for the year, including cover, index, undated calendar, milestones, helicopter overview, and monthly planning pages.
Here’s an example of how to use user input to customize the journal content:
const topMilestones = true; // User input
const undatedCalendar = false;
const indexPage = true;
const coverPage = true;
const helicopterOverview = false;
const dottedGridCount = 5;
const dailyPlanning = true;
const flexibleTracking = true;
const doc = new jsPDF();
if (coverPage) journal.addCoverPage(doc);
if (indexPage) journal.addIndexPage(doc);
if (undatedCalendar) journal.addUndatedCalendarPages(doc);
if (topMilestones) journal.addTopMilestonesPage(doc);
if (helicopterOverview) journal.addHelicopterOverviewPage(doc);
for (let i = 0; i < dottedGridCount; i++) {
journal.addDottedGridPage(doc, 0.2, { width: 8.27, height: 11.69 });
}
if (dailyPlanning) journal.addDailyPlanningPage(doc, { width: 8.27, height: 11.69 });
if (flexibleTracking) journal.addFlexibleTrackingPage(doc, { width: 8.27, height: 11.69 });
// Save the generated PDF
doc.save("Custom_BulletJournal.pdf");
Method | Description |
---|---|
addCoverPage(doc) |
Adds a cover page |
addIndexPage(doc) |
Adds an index page |
addUndatedCalendarPages(doc) |
Adds monthly calendar pages |
addTopMilestonesPage(doc) |
Adds milestones page |
addHelicopterOverviewPage(doc) |
Adds helicopter overview |
addDottedGridPage(doc, spacing, dimensions) |
Adds dotted grid |
addDailyPlanningPage(doc, dimensions) |
Adds daily planning |
addWeeklyOverviewPage(doc, dimensions) |
Adds weekly overview |
addFlexibleTrackingPage(doc, dimensions) |
Adds flexible tracking |
To run tests and check for code coverage:
npm test
- jsPDF - For generating PDF documents.
- Custom color schemes and design elements can be further customized by modifying
bujo.js
.
This project follows Semantic Versioning (SemVer). Using standard-version
, version numbers are automatically updated based on the following types of commits:
- fix: Patch release for bug fixes.
- feat: Minor release for new features.
- BREAKING CHANGE: Major release for backward-incompatible changes.
To ensure versioning is correctly applied, use these commit message conventions:
fix: <description>
– for bug fixes (patch).feat: <description>
– for new features (minor).feat!: <description>
– for breaking changes (major).
For example:
git commit -m "feat: add helicopter overview page"
git commit -m "fix: correct typo in milestone section"
- Fork the repo.
- Create a feature branch (
git checkout -b feature/YourFeature
). - Commit changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a Pull Request.