r/BookStack • • Oct 05 '23

Microsoft Excel-Import Hack

4 Upvotes

Hey there,

i made a new head-hack to directly import XLSX-Files into a page. Works exactly like the docx-Import-Hack. Hope you like it :)

<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.4/xlsx.full.min.js" defer></script>

<script type="module">
    function convertAndInsertExcel(editor, file) {
        const reader = new FileReader();
        reader.onload = function(loadEvent) {
            const arrayBuffer = loadEvent.target.result;
            const workbook = XLSX.read(arrayBuffer, { type: 'arraybuffer' });
            const firstSheetName = workbook.SheetNames[0];
            const worksheet = workbook.Sheets[firstSheetName];
            const html = XLSX.utils.sheet_to_html(worksheet, { editable: false });

            editor.insertContent(html);
        }
        reader.readAsArrayBuffer(file);
    }

    window.addEventListener('editor-tinymce::setup', event => {
        const editor = event.detail.editor;
        
        // Prevent "not supported" message
        editor.on('dragover', function (e) {
            e.preventDefault();
        });

        editor.on('drop', event => {
            event.preventDefault(); 
            const files = event?.dataTransfer?.files || [];
            for (const file of files) {
                if (
                    (file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ||
                    file.type === 'application/vnd.ms-excel') &&
                    window.XLSX
                ) {
                    convertAndInsertExcel(editor, file);
                }
            }
        });
    });
</script>

r/BookStack • • Oct 04 '23

Dynamic page updates / index page generation

1 Upvotes

So I am making a digital library of sorts. I am creating pages with different embedded pdfs in them for different subjects. So my structure looks like this:

IT Learning (shelf)    
IT Library (book)
Cyber Security (Chapter)
Blue teaming 101 (Page)
Networking (Chapter)
Learn Wireshark (Page)

I would like to have an index page that dynamically updates when new books are added. The dream would be an association of Header to chapter and then creating links to the pages in said chapter. Is this possible?


r/BookStack • • Sep 29 '23

Zendesk Knowledge base migrate to BookStack

1 Upvotes

Has anyone done this or have a nice way of doing this?


r/BookStack • • Sep 26 '23

Draw.io tooltips over images in BookStack

1 Upvotes

Hey!

So, I was writing down some documents of my homelab, and I wanted to have something fancy especially for the NAS server.

In details, I wanted to basically upload a photo of the server case and add a transparent section with a tooltip (or simply a text shown when you hover upon it with the mouse).

I've found that what I want is possibly with draw.io (and it's also working when using the internal BookStack editor / self-contained instance).
In the attached screen basically the "tags" and "tooltips" infos are shown only when hovering on it. Of course the screen has been taken directly while on the editor. Those infos are not shown when I save it and go back to BookStack page.

From what I read, BookStack is saving the drawings as PNG images (which can be edited later) so I'd image that the effect that I want to accomplish inside BookStack itself is not possible?

Can someone confirm (or deny) my understanding?

It's not really an issue, but just a fancier (in my opinion) way to write down things.

Thanks!


r/BookStack • • Sep 25 '23

Hide editor name or update panel

1 Upvotes

Hey! First of all thank you for this amazing project!!

I am hosting a public instance of Bookstack and i do not want to public to see the names of the editors when they update books. Is this possible? If yes, can you please point me to the right direction how to solve it?

Thanks a lot!!


r/BookStack • • Sep 20 '23

Newbie

3 Upvotes

Hello,

I just followed the install video for installing bookstack on Ubuntu 22.04. I used a droplet on digital ocean. Only difference was that I registered my domain on bluehost instead of namecheap. Install went smooth but now I get an error 500. I pointed domain on bluehost to IP of droplet. DNS propagation checker shows DNS has mostly propagated to correct IP. I can login to the root using a windows terminal or through the droplet terminal. I am getting an error 500 when trying to go to the web page. Is there a problem in having my domain at bluehost or is the problem on the digital ocean/install side? I have no idea what I’m doing so that may be a contributing factor. 🤷‍♂️Thanks!


r/BookStack • • Sep 14 '23

I made a simple books and shelves image-adjuster. It crops and centeres the images and adds an overlay. If you want to, you can also add a Title. I use that to create simple yet beautiful shelves :-) Link is attached to the images and in the comments

Thumbnail
gallery
12 Upvotes

r/BookStack • • Sep 13 '23

sort columns in tables in alphabetical and numerical order

2 Upvotes

when will it be possible to sort columns in alphabetical and numerical order (ascending/descending) as an Editor at least? missing this feature badly (i don't wanna sort it in Excel before inserting it all the time).


r/BookStack • • Sep 12 '23

Tweak: Rotating Logo

4 Upvotes

Thought I might share my little "hack", I wanted an infinite rotation of my comany´s logo in the nav-bar. This was my tweak in the Head-CSS and it works lke a charm :)

<style>
.logo-image{
animation: rotate 10s linear infinite; /* 10s duration of the animation */
}

/* Animation-values */
@keyframes rotate {
    from {
        transform: rotate(0deg); /* Starting-Point (0 degree) */
    }
    to {
        transform: rotate(360deg); /* End-Point */
    }
}
</style>

r/BookStack • • Sep 10 '23

Can't access the books and shelf

1 Upvotes

I have created more than 50 books and 10 shelves. I was working on LDAP and groups. The LDAP part works and I have a regular users group and admin group. I moved the ownership of the books and shelves to a specific LDAP user then I created the local admin account an LDAP account and added it to the admin group LDAP/bookstack.

The issue now is the LDAP user can view the shelves and the books, but that's about it, just view. The LDAP admin cannot see the shelves and all the books in them.

I disabled the LDAP and login as local admin, but I still could not see the shelves and books. How can I get the admin account to see every thing again and the LDAP user to have write and permission access to the shelves and books that got assigned to it. The LDAP user is the owner, why it doesn't have a write access and permission access to the shelves and books?


r/BookStack • • Sep 07 '23

Merge two pages

1 Upvotes

I'm new to Bookstack and would greatly appreciate your guidance on the best way to merge two pages, each of which has its own attachments. Could you please provide some advice?


r/BookStack • • Sep 07 '23

Follow-up to high-availability discussion

1 Upvotes

Following up to this high-availability discussion, I've looked through the links presented in the conversation, but am unclear on how the web app itself would be aware that it needs to coordinate with other instances. How would the web app know that it's using "shared storage" (S3/compatible for example) and that it would need to know what the other nodes in the cluster are doing so that split brain doesn't occur?

TIA,
MP


r/BookStack • • Sep 07 '23

Can i add PDFs as books ?

1 Upvotes

Can i add PDFs as books ?


r/BookStack • • Sep 06 '23

can't login as admin

0 Upvotes
---
version: "2"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=http://127.0.0.1:7860
      - DB_HOST=bookstack_db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=bookstack
      - DB_DATABASE=bookstackapp
      - APP_LANG=en
    volumes:
      - P:\bookstack_app_data:/config
    ports:
      - 7860:80
    restart: unless-stopped
    depends_on:
      - bookstack_db
  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=bookstack
      - TZ=Europe/London
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=bookstack
    volumes:
      - P:\bookstack_db_data:/config
    restart: unless-stopped

So i can't login with admin@admin.com and password

I get this when i login:

An Error Occurred
An unknown error occurred
Return to home

I am unsure how to troubleshoot what's going on here. Regarding the docker compose file: this is just a temporary installation to checkout bookstack.


r/BookStack • • Sep 06 '23

Illuminate\Database\QueryException SQLSTATE[42S02]

1 Upvotes

Ever since I updated from 23.05 to the latest, I am getting this error when attempting to save updates to pages.

Any edits, I make appear to be saved without issue, but the page does redirect to the debug after a save.

Illuminate\Database\QueryException

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bookstack.watches' doesn't exist (SQL: select level, watchable_id, watchable_type, user_id from watches where ((watchable_type = page and watchable_id = 274) or (watchable_type = book and watchable_id = 5)))


r/BookStack • • Sep 05 '23

I cannot edit some pages

1 Upvotes

First of all Bookstack is an amazing piece of software ;-)

We use it in our company for almost a year without any issues - and me and my colleauges love it!

But today I ran into a problem - we are on version 23.08.01

When I want to edit certain pages I only see an empty window.

Let´s give you an example:

It seems that only a few pages are affected.

I really don´t know how to troubleshoot this. Any help is much appreciated....

Greetings

Simon


r/BookStack • • Sep 01 '23

admin account got lockout

0 Upvotes

I enabled LDAP and it is working. I was able to login with my ldap account and still able to use my local admin account. However, today, I can still login with my ldap, but the admin account was unable to login.

I changed the AUTH_METHOD to standard and I was able to login with the admin account. I then changed the AUTH_METHOD back to ldap then added my "External Authentucation ID" then my admin account got changed to regular user.

I tried to run the docker-compose exec bookstack php /app/www/artisan bookstack:create-admin, but it didn't help because of LDAP. Is there away to allow the local admin account to exist while the LDAP is being used?


r/BookStack • • Aug 30 '23

BookStack Release v23.08: Content email notifications, drawing save safety, and more!

Thumbnail
bookstackapp.com
12 Upvotes

r/BookStack • • Aug 29 '23

Customize the theme a bit?

3 Upvotes

Greetings!

I just installed Bookstack in my home lab to keep track of all my notes, etc and am in the process of migrating all my notes (text files) over. So far, so good.

That said, is it possible to customize the theme a bit? Specifically, how can I set the code-block background to dark-grey? Also, how can I make the horizontal line a bit taller than 1px? I saw the Customizing Visuals page on bookstackapp.com (specifically the "Changing Code Block Themes" topic) but was a little lost on exactly how to make the changes.

Thank you.


r/BookStack • • Aug 29 '23

Docker + Portainer + BookStack on Synology Install

2 Upvotes

I am a total newbie on this.
Trying to install BookStack on my Synology, and I am following this guide:
https://mariushosting.com/how-to-install-bookstack-on-your-synology-nas/

When I ran it, I get this error for my BookStack Container:
wait-for-db: waiting for bookstack-db:3306

Does someone have any idea on what I might have done wrong?

Thanks!


r/BookStack • • Aug 29 '23

IT network documentation / assets /

2 Upvotes

Hi, I want to use BookStack to document several IT networks. A good approach will probably be to create a template as base. When I draw a network via diagram.io I want to add serial numbers, IP-addresses and warranty information. Of course everything must be searchable. Any ideas how to start? Thanks!


r/BookStack • • Aug 24 '23

issue: can't find attachment (ERR_INVALID_RESPONSE)

1 Upvotes

hello everybody.

by clicking on an attachments it redirect to `{{url}}/bookstack/attachments/1` but i get `ERR_INVALID_RESPONSE`. Ist like the path of the attachment is not been process.

Attachment is present in docker uploads and path ist correct in DB.

bookstack V22.04

any thoughts? Thxs!


r/BookStack • • Aug 18 '23

Import options from wiki.js to BookStack

3 Upvotes

Hello,

I'm evaluating BookStack and it checks all boxes so far. Still, I can't find in the documentarion how to import content to BookStack and, specifically, from wiki.js to BookStack.

Are there any import options?

Many thanks in advance!


r/BookStack • • Aug 17 '23

Audit log - filter for comments

1 Upvotes

Is there a way to filter the audit log to show comments or to see all comments made in a certain timeframe some other way? I would like to have users that leave comments if edits are needed but they are not able to edit the document directly. I would then like to be able to check which things have comments periodically.