Project Euler Stats
Welcome to the docs for the Project Euler Stats plugin for Obsidian!
This plugin allows you to seamlessly integrate and display Project Euler profile statistics directly within your Obsidian notes. Project Euler Stats allows users to track their progress in solving problems on the Project Euler platform. By using a simple command, users can generate a detailed profile that displays their profile, progress, tasks, awards, and friends’ rankings.
Features
-
Profile Information:
- Displays your Project Euler account details, including username, alias, location, programming language, level, and number of solved problems.
-
Progress Overview:
- Shows your overall progress, including the percentage of problems solved and your rankings in global, regional, and language-specific leaderboards.
-
Tasks:
- Lists your current tasks, such as the number of problems remaining to reach the next level or improve your rankings.
-
Awards:
- Displays your progress toward earning Project Euler awards, including both completed and uncompleted awards.
-
Friends:
- Compares your progress with your friends on Project Euler.
Installation
-
Install the Plugin:
- Open Obsidian.
- Go to Settings → Community plugins.
- Click Browse and search for “Project Euler Stats”.
- Install and enable the plugin.
-
Configure Your Project Euler Settings:
- After enabling the plugin, go to Settings → Project Euler Stats.
- Enter your
SessionId
andKeep-Alive
cookie values in the provided fields. - Save the settings.
See below section “How to extract cookies?”
Usage
To display your Project Euler progress, use the following code block in your Obsidian note:
```euler-stats
```
This will generate a document with your Project Euler statistics, including your profile, progress, tasks, awards, and more.
Sections
Profile
This section displays your account information, including:
- Account: Your Project Euler username.
- Alias: Your display name.
- Location: Your geographical location.
- Language: The programming language you are using.
- Level: Your current level in Project Euler.
- Solved: The number of problems you have solved.
Progress
This section provides an overview of your progress:
- Progress: Shows how many problems you have solved out of the total available, along with the percentage.
- Ranking: Displays your current ranking in various categories, such as Eulerians, by location, and by language.
Tasks
Here, you can see your current tasks and how many problems you need to solve to reach the next level or ranking.
Personal tasks
You can add and track your personal tasks using the euler-stats
code block format.
This allows you to monitor your progress on specific Project Euler problems directly or any another specific task
in your Obsidian notes.
```euler-stats
Solve problem 3; 0%
Solve problem 14; 15.6%
Solve problem 15; 27.1%
The Other personal task; 99.99%
```
Each task should be written in the following format:
<task>; <progress>%
<task>
: Your personal task.<progress>
: The percentage of progress you have made on the problem (e.g.,0%
,15.6%
,100%
).
Personal tasks will be added before “standard” ones in the order they are declared.
Location progress
This section provides an overview of your ranking in the Location rating on Project Euler. Currently, this account is not in the Top 100, with 118 problems solved. The table below breaks down the number of problems required to reach higher ranks, such as Top 100, Top 50, Top 25, Top 10, Top 5, and Top 1, along with the number of problems remaining to achieve each milestone.
This section helps you track your progress and set goals for climbing the ranks in the Location leaderboard.
Language progress
This section highlights your ranking in the Language rating on Project Euler. This account is currently in 82nd place, with 118 problems solved. The table outlines the number of problems needed to advance to higher ranks, such as Top 50, Top 25, Top 10, Top 5, and Top 1, along with the remaining problems required for each milestone.
This section helps you track your progress and set goals for climbing the ranks in the Language leaderboard.
Level progress
This section provides an overview of your level progression on Project Euler. It displays your current level, the number of problems you’ve solved, and how close you are to reaching the next levels. Additionally, it shows how many members have achieved each level, giving you a sense of your standing within the community.
This section is designed to help you stay motivated and focused on your journey through Project Euler’s levels. Keep solving problems to climb higher and join the ranks of the top members!
Awards
This section provides an overview of the awards you can earn on Project Euler. Awards are divided into three categories: Problem Solving Awards, Contributor Awards, and Forum Based Awards. Each award has a description, the number of members who have earned it, and a progress bar to track your progress.
This section helps you stay motivated by showcasing your achievements and highlighting areas for improvement. Keep solving problems, contributing, and engaging with the community to unlock more awards!
Friends
This section shows a leaderboard of your friends, including their ranks, usernames, solved problems, levels, and awards.
Syncing with Project Euler
By default, the plugin uses data from the local cache to avoid overloading the Project Euler website. This ensures faster access to your stats and reduces unnecessary requests to the server.
How to Sync Data
To update your data with the latest information from Project Euler, follow these steps:
-
Run the command
Project Euler Stats: Sync with Project Euler
.- This command will fetch the latest data from the Project Euler website and update your local cache.
-
Success Message:
- If the sync is successful, you will see a notification:
Successfully synced with Project Euler.
- If the sync is successful, you will see a notification:
-
Error Handling:
- If the sync fails, it usually means that your session has expired.
What to do if this happens:- Go to the Project Euler website and log in.
- Check the values of your cookies:
PHPSESSID
keep_alive
- Update these values in the plugin’s settings:
- Open the plugin settings in Obsidian.
- Replace the old
SessionId
andKeep-Alive
values with the new ones.
- Run the sync command again.
- If the sync fails, it usually means that your session has expired.
Example Workflow
- You’ve solved a new problem on Project Euler and want to update your stats in Obsidian.
- Run the
Project Euler Stats: Sync with Project Euler
command. - If successful, your stats will now show the updated progress.
- If the sync fails, follow the steps above to update your session cookies and try again.
How to extract cookies?
To retrieve cookies for a specific website from your browser, follow these steps:
Google Chrome:
- Open the website in Chrome.
- Right-click anywhere on the page and select Inspect (or press
Ctrl+Shift+I
/Cmd+Option+I
). - Go to the Application tab in the Developer Tools.
- In the left sidebar, expand Cookies and select the website’s domain.
- You will see a list of cookies with their names and values.
Firefox:
- Open the website in Firefox.
- Right-click anywhere on the page and select Inspect Element (or press
Ctrl+Shift+I
/Cmd+Option+I
). - Go to the Storage tab in the Developer Tools.
- Expand Cookies and select the website’s domain.
- The cookies and their values will be displayed.
Microsoft Edge:
- Open the website in Edge.
- Right-click anywhere on the page and select Inspect (or press
Ctrl+Shift+I
/Cmd+Option+I
). - Go to the Application tab in the Developer Tools.
- Expand Cookies and select the website’s domain.
- View the cookies and their values.
Safari:
- Open Safari and go to the website.
- Enable the Develop menu by going to Safari → Preferences → Advanced and checking Show Develop menu in menu bar.
- From the Develop menu, select Show Web Inspector (or press
Cmd+Option+I
). - Go to the Storage tab and expand Cookies to view the website’s cookies.
Using JavaScript:
If you have access to the browser’s console, you can retrieve cookies for the current site using JavaScript:
document.cookie;
This will return a string of all cookies for the current domain.
Important Notes:
- Cookies are domain-specific, so you can only access cookies for the site you are currently on.
- Some cookies may be marked as
HttpOnly
, meaning they cannot be accessed via JavaScript for security reasons. - Always handle cookies responsibly and in compliance with privacy laws and regulations.
Here’s the translated and enhanced version of the troubleshooting documentation:
Troubleshooting
Common Issues and Solutions
HTTP Error!
If you encounter an HTTP error, follow these steps:
-
Check Your Cookie Values:
- Ensure that your
SessionId
andKeep-Alive
cookie values are correctly configured in the plugin settings. - To update these values:
- Log in to the Project Euler website.
- Retrieve the latest
PHPSESSID
andkeep_alive
values from your browser’s cookies. - Update these values in the plugin settings in Obsidian.
- Ensure that your
-
If the Issue Persists:
- Enable the Obsidian Console to gather more information about the error:
- Open Obsidian.
- Press
Ctrl+Shift+I
(Windows/Linux) orCmd+Option+I
(Mac) to open the Developer Tools. - Navigate to the Console tab to view error messages.
- Enable the Obsidian Console to gather more information about the error:
-
Report the Issue:
- If the problem persists, please report it on GitHub:
- Take a screenshot of the error message.
- Copy the error logs from the Obsidian Console.
- Open a new issue on the plugin’s GitHub repository and include:
- A description of the problem.
- The screenshot of the error message.
- The error logs from the Console.
- If the problem persists, please report it on GitHub:
Support
For issues or feature requests, please open an issue on the GitHub repository.
Enjoy tracking your Project Euler progress directly in Obsidian! 🚀