Has anyone built a crude CMS ( Code Management System) in Pelles C

Started by ddainelis1, March 11, 2026, 02:51:43 AM

Previous topic - Next topic

ddainelis1

Has anyone built a crude CMS ( Code Management System) in Pelles C.    I'm working on a Dartmouth style BASIC interpreter since my old ALTAIR 8080 died.  I really do not want to spend the time to fully understand GITHIB right now.   Just wondering.

Vortex

Code it... That's all...

ddainelis1


rweidner

That's an interesting project idea, actually. If the scope of the project was limited to source code and ignored binary assets (images, sound, etc.), you could in theory use sqlite (or any db that supports triggers)

A CRUDE but effective workflow might be.

- scan source code directories for code files (for example, .c or .h)
- check file timestamps
- find the file in the database
- If file times on the file system differ from the one stored in the database, change the content in the database.
- If it doesn't exist at all, insert it. (filepath, file timestamp, content)
- use a "BEFORE" trigger to copy the current row into a history table. The history table will look like the code table plus a new primary key.

I mean, that's no GIT replacement, but it would track changes.

Is that what you meant by "crude"? Or did you need something more?

I think with just a little more work, one could add revisions.

Vortex

By the way, the abbreviation must be CRUD if I am not wrong :

Quotecreate, read, update, and delete (CRUD)

https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
Code it... That's all...

rweidner

I've decided to write one. I have dozens of projects that I don't really want on GitHub because... well... because I don't. So, I'll make this. I've decided not to use SQLite. Instead it will be purely file-based. The motivation for making it file-based is to minimize the amount of UI I need to create. Instead, I'll assume the user has WinMerge or similar. This process should be pretty quick and will be a nice distraction for me.

It's not intended to be like or ever replace GitHub. For me, it's just a place to put projects that linger around longer than expected.

The code will be written in C using PellesC.

ddainelis1

I'm working on one right now.  Here is the screen shot of help menu. 
Right now I'm cleaning up the help file in this version before I go to the next version V0.9 which will have create and fetch baseline.    Also,  I'm working on a script to test each version so I don't have to manually test it and figure what broke where.

CMS Development App
Type HELP for commands. Press Ctrl+Z to exit.

Root set to: E:\CMS_LIB
Library opened: E:\CMS_LIB\test2
CMS> ver
CMS Version V8.4PREA  (build Mar 11 2026 11:48:36)
CMS> help
Commands working in V8:
  HELP
  SHOW ROOT
  SHOW DRIVE
  SHOW VERSION
  SET DRIVE
  SET USERID
  CREATE LIBRARY
  OPEN LIBRARY
  SHOW LIBRARY
  SHOW CONFIG
  CREATE ELEMENT
  SHOW ELEMENT
  FETCH ELEMENT
  EXIT
  QUIT
  DEV

Commands present in notes but NOT working in this build:
  SET ROOT
  HISTORY
  CREATE BASELINE
  FETCH BASELINE
 

Use HELP <command> for details on one command.
CMS>


ddainelis1

V10 will be the new command:
Add "element" "get" to BASELINE

any suggestions here....

rweidner

This is what I came up with. I run it from a .bat file.

crude.bat
C:\dev\crude\crude.exe "C:\dev\XecronixEngine\FBIPursuit" "C:\CRUDE"
C:\dev\crude\crude.exe: this is where I built crude
C:\dev\XecronixEngine\FBIPursuit: this is the source for a project I wanted to put in a repo.
C:\CRUDE: This is where my repos go. I could have many.

Here is the code and project file if you'd like to see it:
https://github.com/xecronix/crude