One of the big events I have been involved in Japan is "tech book festival" (技術書典). If you have ever heard of Comic Market in Japan, you'd find it similar but the targets are limited to technology.
It is one-day festival in Tokyo, held at Akiba, where all the geeky things get together. The visitors are mostly engineers. Last time it was in October, unfortunately on a Typhoon day, yet there were more than 3000 people. The next one will be on Apr. 22nd (tomorrow, at the time of writing).
In Japan, and I assume everywhere in the world, book publishers are shrinking and the industry is sunsetting. Programming and engineering books are not exceptional. But on the contrary, this festival is super active. How is it possible??
There are some factors that make it happen.
There are lots of "circles" (independent people or communities who write books), and they don't have to be very popular. The first TechBookFest was done with 50-ish circles, and the next one will be 246 of those. Their topics are often quite niche, sometimes super niche. They write about whatever they are most interested and would like to write. Just like comic authors at the Comic Market, they don't care much about sales - or they do care, but it's not the top priority. They are not publisher companies and it's not commercial driven.
And since it's a face-to-face festival, it is not only about selling and buying books. They can have some (brief) talk about the technology the circles are writing, and get connected if they want. Similarly, we, the event organizers, lay out those similar circles close, so those neighbors can friend and chat. I have my own circle about Xamarin too, and it is laid out right next to the circle for React Native next time. Flutter circle is on the counterpart too. (Actually we are already all friends.)
So you think they won't sell at all? But there are 3000-ish visitors who are really interested in technology. What happens if there are such a lot of visitors browsing all the books at the market? Tenth of people, often hundreds, get interested in your books. It does not have to be sold for thousands. And the number is power. You are not alone to get attraction. There are >200 similar authors.
One of an interesting move that happened from the festival is that there are commercial book publishers (they can also join, sell and exhibit their publications at the festival) that are always looking for interesting books that are in commercial quality.
For example, at the second fest we have published two books about Xamarin (I tried to organize all into one book, but the authors were too passionate and wrote a lot of pages so that I had to split them).
I made a minimalist promotion page for that (which is written in 199Xs markup technology), but it didn't matter. Most of the promotions were done by the co-authors, and those 100 copies for each book were all sold out in 2.5 hours.
I have to say, our book was supreme as of the time of writing, written by top local developers, so some of the publishers got contacted with me if we were interested in publishing those books commercially. So we did.
The next book at the next festival (TBF3) didn't sell that much, but it is still commercially published too. I'm not interested in managing everything for commercial publishing, so our next book won't go commercial (I decided so). But I'm totally happy with indie publication. The commercial publisher takes 85% of the revenue for printed books, which is, well, absurd. We can publish by our own and what they do is only to make some edits and manage everything for Amazon/Kindle (I can do that too).
That's a "successful" case, but you don't even have to be "successful". It's not really the point when you are enjoying the festival. Your publications don't have to be "great". You can find inspiring books, even better if you are distributing your books of your own best interest, and find friends of the same interest.
For the upcoming one, I wrote a book by myself about my Music Macro Language (MML) to MIDI compiler, explaining how to use it, what the syntax is like, and tips for authoring each instrument part e.g. for bass, guitar, drums and keyboards. It is kind of normal content for MML authors, but MML itself is super niche, technology from 20th century. But after I announced it, I received a handful of (not many) requests for and interest in that book ("I want your MML book!"). They are "music to my ears" ...!
The entire festival is managed by two organizations: TechBooster is a software engineer community. The group has been publishing their indie books about Android/mobile and Web at the Comic Market, and now the festival by themselves too. tatsu-zine.com (達人出版会) is an ebook publisher that has been for many years. I'm one of the members of the former and sometimes write about Android stuff.
After some experiences at the Comic Market, the leader started saying like "what if we organize our own festival for tech books?" ...That sounded crazy (the leader always have some crazy ideas), but it somehow realized, and now it's huge.
The core event organizer group is of a few people, and there are like ~50 staffs on the festival day. The group prepares all the websites, organizes the list of circles which visitors can bookmark them (and those at circles can see how many bookmarks they get), support them by several means, even offering online payment system will mobile apps. It's super busy activity especially in the week before the day.
They are highly skilled developers and they often solves the problems technologically. For example, at TBF2 we had to make a lengthy line for waiting people to enter. At TBF3 we have a ticketing system and web page which notifies visitors the maximum ID number of the ticket ("People with ticket number XXX can enter") and the stressful queue is gone.
(And of course the organizer asks for support in money too - each circle has to pay 7000JPY, but that's of course not enough to run the entire event. That's mostly the leader's job.)
TechBooster takes an interesting approach to compose books. When we are authoring them, our circle uses Github repos (in my private account) that are tailored for it. We use a specific markup language called Re:VIEW as the text format, which is suited for book rendering to PDF (using latex) as well as HTML and EPUB. The group publishes an open repository for ReVIEW template as well as their open book on How to write a book using Re:VIEW. There is even a Docker image for Re:VIEW.
On the editor side, we also have editor plugins support for Re:VIEW too. Atom has the first support, and I brought it to VSCode too. It supports preview, spell-check-like editorial helpers, and jump to sections.
Those drafts written in that simple markup language is easy to manage on Github - easy to get diffs, comment, create pull requests, integrating CI builds (for books!) and so on. It's very modern way. It's possible because almost all people in the group are software engineers and know how to git (we often have designers too).
The approach is then taken by many circles and thus helped growing the tech book community. Now I have my own circle for Xamarin too, and it's also based on their project template.
After writing the first draft, we have some "review" process. Usually TechBooster does mutual review each other, but this time for my own circle there were not many authors, so I only asked some friends to do it for our drafts. They did awesome job, so I could make a lot of improvements.
I usually ask my friend painter to draw something I indicate (I pay for it), but this time (for the upcoming festival) I had to do it by myself, and it was hackily done.
There are many small printing companies which offers support for indie books (同人誌 in Japanese) and printings can be done by sending a book body PDF and a cover page PSD like this:
Those small companies are used to this kind of books because of the huge printing need at the Comic Market. There are similar domain-specific events (which we often call "[xyz-]only event" which deals only with [xyz]-stuff) and we TechBookFest are just one of those.
I get familiar with command line tools for manipulating PDFs like pdftk or ImageMagick, as well as dealing with coverpages templates using Krita (which is AFAIK the only tool that I can generate Photoshop *.psd files in CMYK on Linux desktop).
Some of the printing companies are "supported" by the event organizer, and they ship the printed books to the festival venue (for free for my case). The organizer group takes a lot of care about the circles' activities.
Did you get interested? Basically it began with a small independent activity, grew up in public manner. How about your city? It was possible in Tokyo. There weren't ComicCon before but now there are. How about book festival?